/*  BlogBotFrame.java Version 102 - 27th May 2008
 *  BlogBotFrame.java creates a new frame for the GUI
 *  See Versions for program version number
 *  Copyright (C) 2008  Andy Broomfield andy@newmediathinking.com
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
*/

package net.blogbotplatform.blogbot;

//simply used as a way of managing the GUI window for now.

import java.awt.*;
import java.awt.event.*;

public class BlogBotFrame extends Frame {	
	private static final long serialVersionUID = -7252398270299645753L;
	
	BlogBotPanel panel;
	
	BlogBotFrame() {
		this.enableEvents(AWTEvent.WINDOW_EVENT_MASK);
		this.setResizable(true);
		
		panel = new BlogBotPanel();
		this.add(panel);
		
		this.setTitle("Blog Bot");
	}
	
	
	//somebody closed the window.
	public void processWindowEvent(WindowEvent e) {
	    if (e.getID() == WindowEvent.WINDOW_CLOSING) {
			System.out.println("Blog Bot Exiting...");

			super.processWindowEvent(e);
			
			panel.stopTask();	
			
			System.exit(0);
		}
	}
}

